﻿using System;
using Furiant.Figment.Agents.Inventory;

namespace Furiant.Figment.Items
{
    public interface IRechargeable
    {
        /// <summary>
        /// Gets or sets the current charge value of the item.
        /// </summary>
        ushort Charge { get; set; }

        /// <summary>
        /// The maximum value which the Charge property may have.
        /// </summary>
        ushort ChargeMax { get; }

        /// <summary>
        /// Returns the amount by which the Restore extension method will increase the Charge value of the instance.
        /// </summary>
        Func<IHasInventory, ushort> RestoreFunction { get; }

        /// <summary>
        /// Returns the amount by which the Deplete extension method will decrease the Charge value of the instance.
        /// </summary>
        Func<IHasInventory, ushort> DepleteFunction { get; }
    }
}
